<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core">


<ui:composition template="../comum/template.xhtml">
	<ui:define name="conteudo">
		<p:panel header="Cadastro de Perguntas" style="width:50%; ">
			<p:panelGrid columns="2">
				<p:outputLabel for="pergunta" value="Pergunta:"
					style="font-weight:bold" />
				<p:inputText id="pergunta" value="#{cadPergunta.pergunta.pergunta}"/>

				<p:outputLabel for="resposta" value="Resposta:"
					style="font-weight:bold" />
				<p:inputText id="resposta"
					value="#{cadPergunta.pergunta.resposta.resposta}"/>
					
				<p:outputLabel for="reposta1" value="Resposta 1:"
					style="font-weight:bold" />
				<p:inputText id="reposta1" value="#{cadPergunta.resposta1.resposta}" />

				<p:outputLabel for="reposta2" value="Resposta 2:"
					style="font-weight:bold" />
				<p:inputText id="reposta2" value="#{cadPergunta.resposta2.resposta}" />

			</p:panelGrid>
			<p:commandButton id="btnPergunta" value="Submit"
				actionListener="#{cadPergunta.cadastrar}" update="messages"
				style="margin:10px 0px 0px 60%;" />
			<p:messages id="messages" showDetail="true" autoUpdate="true"
				closable="true" />
		</p:panel>

	</ui:define>

</ui:composition>
</html>